/*
 * Camera.h
 *
 *  Created on: Dec 8, 2011
 *      Author: burek
 */

#ifndef CAMERA_H_
#define CAMERA_H_

#include "math/Vec3D.h"
#include "math/GLMatrix.h"

class Camera
{
private:
	Vec3D camFront;
	Vec3D camUp;
	Vec3D camRight;

	Vec3D vpSize;

public:
	GLMatrix world;
	GLMatrix projection;

	Vec3D position;
	Vec3D target;
	Vec3D up;
	Vec3D lookDir;

	float vertFOV;
	float aspectRatio;
	float zNear;
	float zFar;

	Camera(float aspect, float near, float far);

	void update();
	Vec3D getViewRay(float x, float y) const;

	const Vec3D & Up() const;
	const Vec3D & Right() const;
	const Vec3D & Forward() const;

	~Camera();
};


#endif /* CAMERA_H_ */
